package com.example.demo.testcontroller;

import com.example.demo.testannotation.CustomLogAnnotation;
import com.example.demo.testannotation.Idempotent;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lishuo
 * Date: 2024-01-25
 * Time: 16:51
 */
@RestController
public class TestController {
    @CustomLogAnnotation(value = "测试自定义注解001",enable = true)
    @GetMapping("/test1")
    public String testAnnotationMethod1() {
        return "--测试方法执行时间自定义注解（aop）--";
    }

    @Idempotent(requstId = "testId",expireTime = 30)
    @GetMapping("/test2")
    public String testAnnotationMethod2() {
        return "--测试幂等自定义注解（拦截器）--";
    }
}
